#include "CGamePlay.h"



GamePlay::GamePlay(HINSTANCE hInstance,int _mode,bool _Isfullscreen,int _frameRate):
	IGamePlay(hInstance,_mode,_Isfullscreen,_frameRate)
{
	
};

GamePlay::GamePlay()
{
	
};

GamePlay::~GamePlay()
{
	IGamePlay::~IGamePlay();
};

void GamePlay::Init()
{
	ResourceManager::GetIns()->Init();
	StateManager::GetInstance()->AddScreen(new MenuScreen());
}
void GamePlay::Update(float dt)
{
	StateManager::GetInstance()->Update(dt);
	StateManager::GetInstance()->UpdateInput(m_Input,dt);

};

void GamePlay::Render()
{
	GL_graphic->BeginRender();
	//GL_graphic->m_pSpriteHandler->SetTransform(&camera->GetTransform());
	GL_graphic->m_pSpriteHandler->Begin(D3DXSPRITE_ALPHABLEND);
	
	StateManager::GetInstance()->Draw();

	GL_graphic->m_pSpriteHandler->End();
	GL_graphic->EndRender();
	GL_graphic->GetDevice()->Present(0,0,0,0);
};

void GamePlay::Destroy()
{
	
};